package com.ruoyi.system.service.wechat;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.entity.wechat.WechatInspectionProblem;
import com.ruoyi.system.domain.wechat.request.vo.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 巡检问题
 *
 * @author jiexiang.sun/Jason
 * @version 1.0.0
 * @create 2022-03-06 14:09
 **/
public interface IWechatInspectionProblemService extends IService<WechatInspectionProblem> {

    /**
     * 问题上报
     *
     * @param inspectionProblem
     * @return
     */
    boolean report(WechatInspectionProblemReportVO inspectionProblem);

    /**
     * 问题复检
     *
     * @param inspectionProblem
     * @return
     */
    boolean review(WechatInspectionProblemReviewVO inspectionProblem);

    boolean modify(Long userId, WechatInspectionProblemModifyVO inspectionProblem);

    /**
     * 统计问题列表总数
     *
     * @param params
     * @return
     */
    Integer statisticsProblemCount(FilterForWechatInspectionProblemListVO params);

    /**
     * 统计市级下区县的问题上报数量
     * @param params
     * @return
     */
    List<Map<String, Object>> statisticsByProblemToArea(FilterForWechatInspectionProblemListVO params);

    /**
     * 统计区县下街道的问题上报数量
     * @param params
     * @return
     */
    List<Map<String, Object>> statisticsByProblemToStreet(FilterForWechatInspectionProblemListVO params);

    /**
     * 统计市级下区县的问题类型上报数量
     * @param params
     * @return
     */
    List<Map<String, Object>> statisticsByProblemTypeToArea(FilterForWechatInspectionProblemListVO params);

    /**
     * 统计区县下街道的问题类型上报数量
     * @param params
     * @return
     */
    List<Map<String, Object>> statisticsByProblemTypeToStreet(FilterForWechatInspectionProblemListVO params);

    /**
     * 问题列表
     *
     * @param params
     * @return
     */
    List<WechatInspectionProblemListVO> getList(FilterForWechatInspectionProblemListVO params);

    /**
     * 获取全部问题列表
     *
     * @return
     */
    List<WechatInspectionProblemListVO> getAllList(FilterForWechatInspectionProblemListVO params);

    /**
     * 获取其他任务分页集合
     *
     * @param params
     * @return
     */
    List<WechatInspectionProblemListVO> getByOtherTask(FilterForWechatInspectionProblemListVO params);

    /**
     * 统计审批总数
     *
     * @param params
     * @return
     */
    Integer statisticsApprovalCount(FilterForWechatInspectionProblemListVO params);

    /**
     * 问题审批列表
     *
     * @param params
     * @return
     */
    List<WechatInspectionProblemListVO> getApprovalList(FilterForWechatInspectionProblemListVO params);

    /**
     * 统计问题工单总数
     *
     * @param params
     * @return
     */
    Integer statisticsProblemWorkOrderCount(FilterForWechatInspectionProblemListVO params);

    /**
     * 问题工单列表
     *
     * @param params
     * @return
     */
    List<WechatInspectionProblemListVO> getWorkOrderList(FilterForWechatInspectionProblemListVO params);

    /**
     * 问题详情
     *
     * @param problemId
     * @return
     */
    List<WechatInspectionProblemInfoVO> getInfo(String problemId);

    /**
     * 问题下发
     *
     * @param userId
     * @param deptIds
     * @param problemIds
     * @return
     */
    boolean publish(Long userId, Long userRoleId, String deptIds, String problemIds);

    /**
     * 问题整改
     *
     * @param userId
     * @param problemId
     * @param files
     * @return
     */
    boolean rectification(Long userId, Long problemId, String problemPhoto);

    /**
     * 问题整改退回
     *
     * @param userId
     * @param problemId
     * @param status
     * @return
     */
    boolean audit(Long userId, Long problemId, short status);

    /**
     * 导出任务问题
     *
     * @param params
     * @param response
     */
    void export(FilterForWechatInspectionProblemListVO params, HttpServletResponse response);

}
